<form action="{:url('add')}" method="post" class="form_single">
    <div class="box">
        <div class="box-body">
            <div class="row">
                <div class="col-md-6">
                    <div class="form-group">
                        <label>名称</label>
                        <span class="">（商品名称）</span>
                        <input class="form-control" name="name" placeholder="商品名称" value="{$info['name']|default=''}" type="text">
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label>价格</label>
                        <span class="">（商品价格）</span>
                        <input class="form-control" name="price" placeholder="商品价格" value="{$info['price']|default=''}" type="text">
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label>分类</label>
                        <span class="">（商品分类）</span>
                        <select name="category" class="form-control">
                            <volist>

                                {notempty name='category_list'}
                                {volist name='category_list' id='vo'}
                                 {if condition = "$vo['id'] eq $info['category']"}
                                <option value="{$vo.id}"  selected>{$vo.name}</option>|
                                {else/}
                                <option value="{$vo.id}" >{$vo.name}</option>|
                                {/if}
                                {/volist}
                                {/notempty}
                            </volist>
                        </select>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label>展示位置</label>
                        <span class="">（是否为推荐等）</span>
                        <select name="show_position" class="form-control">
                            {volist name=":config('show_position')" id='vo' key='k'}
                            {if condition = "($k-1) eq $info['show_position']"}
                            <option value="{$k-1}"  selected>{$vo}</option>|
                            {else/}
                            <option value="{$k-1}" >{$vo}</option>|
                            {/if}
                            {/volist}
                        </select>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label>商品介绍</label>
                        <span class="">（商品描述信息/简介）</span>
                        <textarea class="form-control" name="describe" rows="3" placeholder="请输入文章描述信息/简介">{$info['description']|default=''}</textarea>
                    </div>
                </div>

                <div class="col-md-6">
                    <div class="form-group">
                        <label>多图片</label>
                        <span class="">（请上传多图片）</span>
                        <br/>

                        {assign name="img_ids" value="$info.img_ids|default=''" /}
                        {:widget('file/index', ['name' => 'img_ids', 'value' => $img_ids, 'type' => 'imgs'])}

                    </div>
                </div>
            </div>
            <div class="row">


                <div class="col-md-12">
                    <div class="form-group">
                        <label>商品详情介绍</label>
                        <textarea class="form-control textarea_editor" name="detail" placeholder="请输入商品内容">{$info['detail']|default=''}</textarea>
                        {:widget('editor/index', array('name'=> 'detail','value'=> ''))}
                    </div>
                </div>

            </div>

            <div class="box-footer">

                <input type="hidden" name="id" value="{$info['id']|default='0'}"/>

                {include file="layout/edit_btn_group"/}

            </div>

        </div>
    </div>
</form>